home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT1-5 / UPPER.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  607 b   |  25 lines

  1. ;
  2. ;       Program Upper
  3. ;
  4. page 55,132
  5. .model  tiny
  6. .stack  1024
  7. .data
  8. .code
  9. .startup
  10. ;===    
  11.     mov     si,81h                  ; starting address of parameter string
  12.     mov     ah,02h                  ; function 02h - output character
  13.     .WHILE (byte ptr [si] != 0Dh)   
  14.     lodsb                           ; take next character into AL
  15.     .IF al < 'a'
  16.     .ELSEIF al > 'z'
  17.     .ELSE
  18.         and     al,0DFh         ; convert to uppercase
  19.     .ENDIF
  20.     mov     dl,al                   ; copy converted character for DOS service
  21.     int     21h                     ; DOS service call
  22.     .ENDW
  23. .exit   0       
  24.     end
  25.